package com.spring.shops.admin.controller.menu;

import com.spring.shops.model.result.MenuAndPermsData;
import com.spring.shops.model.result.ServerResponseEntityVoid;
import com.spring.shops.model.vo.SysMenuVO;
import com.spring.shops.model.vo.SysMenuVO2;
import com.spring.shops.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/sys/menu")
public class MenuController2 {
    @Autowired
    private MenuService menuService;
    /**
     * 获取用户所拥有的菜单和权限
     */
    @GetMapping("/nav")
    public ServerResponseEntityVoid<MenuAndPermsData> getMenuAndPerms(){
       return menuService. getMenuAndPerms();
    }
}
